Repository navigation
build: declare Automatic-Module-Name for all published jars - #1706
Open
shubham-asthana wants to merge 1 commit into
Open
shubham-asthana wants to merge 1 commit into
shubham-asthana wants to merge 1 commit into
Conversation
shubham-asthana
requested review from
MatejNedic,
maciejwalkowiak and
tomazfernandes
as code owners
September 21, 2026 21:04
Modular (JPMS) applications cannot depend on this project because none of its published jars declare module information, so the JDK falls back to deriving an automatic module name from the jar filename - a mechanism the JDK itself documents as unstable across releases and unsuitable to depend on in a `requires` clause. This adds an explicit, stable Automatic-Module-Name to every module, configured centrally in the parent's maven-jar-plugin management and set per-module via a new automatic.module.name property. Names are chosen to match each module's root Java package (e.g. io.awspring.cloud.sqs for spring-cloud-aws-sqs) so they remain valid if any module later migrates to a real module-info.java. This is intentionally scoped to the automatic-module-name step only, not full JPMS modularization (module-info.java per module), which would need further design input on package/export boundaries. Verified by building affected modules and inspecting the resulting jars with `jar --describe-module`, confirming each now resolves as a named automatic module instead of a filename-derived one. Fixes awspring#1635
shubham-asthana
force-pushed
the
feature/1635-jpms-automatic-module-name
branch
from
September 21, 2026 21:07
b94c80c to
b5674df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1635
Modular (JPMS) applications currently cannot depend on this project, because
none of its published jars declare module information. The JDK falls back to
deriving an automatic module name from the jar filename - a mechanism the JDK
itself documents as unstable across releases and not something a
requiresclause should depend on.
This adds an explicit Automatic-Module-Name to every module, configured
centrally via the parent's maven-jar-plugin management and set per-module
through a new
automatic.module.nameproperty. Names match each module'sroot Java package (e.g.
io.awspring.cloud.sqsfor spring-cloud-aws-sqs) sothey stay valid if a module later migrates to a real module-info.java.
Scope note: this is intentionally just the Automatic-Module-Name step, not
full JPMS modularization (module-info.java per module) - that would need
maintainer input on package/export boundaries first. Happy to adjust the
naming scheme if you'd prefer something else.
Verified by building the affected modules and inspecting the resulting jars
with
jar --describe-module, confirming each resolves as a named automaticmodule rather than a filename-derived one. I wasn't able to run the SQS
module's Docker-dependent integration tests in my environment, but this
change touches no Java source, only jar manifest metadata.